library(GeoPressureR)
library(leaflet)
library(leaflet.extras)
library(raster)
library(dplyr)
library(ggplot2)
library(plotly)
knitr::opts_chunk$set(echo = params$printcode)
load(paste0("../data/6_basic_graph/", params$gdl_id, "_basic_graph.Rdata"))
load(paste0("../data/5_static_prob/", params$gdl_id, "_static_prob.Rdata"))
Pressure timeserie
pressure_na <- pam$pressure %>%
mutate(obs = ifelse(isoutliar | sta_id == 0, NA, obs))
p <- ggplot() +
geom_line(data = pam$pressure, aes(x = date, y = obs), colour = "grey") +
# geom_point(data = subset(pam$pressure, isoutliar), aes(x = date, y = obs), colour = "black") +
geom_line(data = pressure_na, aes(x = date, y = obs, color = factor(sta_id)), size = 0.5) +
geom_line(data = do.call("rbind", shortest_path_timeserie), aes(x = date, y = pressure0, col = factor(sta_id)), linetype = 2) +
theme_bw() +
scale_colour_manual(values = col) +
scale_y_continuous(name = "Pressure(hPa)")
ggplotly(p, dynamicTicks = T) %>% layout(showlegend = F)